const { contextBridge, ipcRenderer } = require('electron')
/**
 * @description: 关闭窗口
 */
const close = () => {
  ipcRenderer.invoke('on-close-event')
}

contextBridge.exposeInMainWorld('myApi', {
  close
})